CHALLENGE: The code editor contains three versions of a program that creates a chessboard.
- All three programs have the same outcome: they create an 8 square x 8 square chessboard!
- Which program is the least efficient? Which program(s) do you think are the most efficient or most readable?
- Look at the code. Can you identify how each program makes the rows alternate colors?
- Play with the code! Use print() to help figure out the values of each variable as the program runs.
To navigate the page using the TAB key, first press ESC to exit the code editor.